package com.example.localizadorv4;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.content.Intent;


public class Settings extends Activity {
    EditText tag;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_settings);
		
		final Button btn_tag = (Button) findViewById(R.id.btn_tag);
		
        btn_tag.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
            	tag = (EditText)findViewById(R.id.InputTag);
            	String tag2 = tag.getText().toString();
            	int tagInt = Integer.parseInt(tag2);
            	switch(tagInt) {
            	case 1:
            	//Enter code for value1 condition here;
            	Intent intent = new Intent(Settings.this, Tag1.class);
        		startActivity(intent);
            	break;
            	case 2:
            	//Enter code for value2 condition here;
            	break;
            	case 3:
            	//Enter code for value3 condition here;
            	break;
            	case 4:
                //Enter code for value3 condition here;
                break;
            	case 5:
                //Enter code for value3 condition here;
                break;
            	case 6:
                //Enter code for value3 condition here;
                break;    		
            	default:
            	//Enter code in the event that that no cases match
            	}
              
            }
        });
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.settings, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle action bar item clicks here. The action bar will
		// automatically handle clicks on the Home/Up button, so long
		// as you specify a parent activity in AndroidManifest.xml.
		int id = item.getItemId();
		if (id == R.id.action_settings) {
			return true;
		}
		return super.onOptionsItemSelected(item);
	}
}
